import request from "../utils/request";

export async function getDataSourceList(params) {
  return request({
    method: "get",
    url: `/dataSource/list`,
    params
  });
}

export async function addDataSource(data) {
  return request({
    method: "post",
    url: `/dataSource/add`,
    data
  });
}

export async function editDataSource(data) {
  return request({
    method: "put",
    url: `/dataSource/edit`,
    data
  });
}

export async function delDataSource(data) {
  return request({
    method: "delete",
    url: `/dataSource/del`,
    data
  });
}

export async function allDataSource() {
  return request({
    method: "get",
    url: `/dataSource/all`,
  });
}

export async function testDataSource(data) {
  return request({
    method: "post",
    url: `/dataSource/check`,
    data
  });
}
